package xyz.lne.researchgroupmanage.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import java.util.Date;
import com.baomidou.mybatisplus.annotation.Version;
import com.baomidou.mybatisplus.annotation.TableId;
import java.io.Serializable;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import xyz.lne.researchgroupmanage.service.dataTransferObject.TaskDTO;

/**
 * <p>
 * 
 * </p>
 *
 * @author team7
 * @since 2021-01-19
 */
@Data
@EqualsAndHashCode(callSuper = false)
@ApiModel(value="Task对象", description="")
public class Task implements Serializable {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty(value = "任务id")
    @TableId(value = "task_id", type = IdType.AUTO)
    private Integer taskId;

    @ApiModelProperty(value = "任务名")
    private String name;

    @ApiModelProperty(value = "发布人id")
    private Integer userId;

    @ApiModelProperty(value = "任务内容")
    private String introduction;

    @ApiModelProperty(value = "所属课题id")
    private Integer researchId;

    @ApiModelProperty(value = "创建日期")
    private Date createTime;

    public Task(TaskDTO taskDTO){
        this.taskId=taskDTO.getTaskId();
        this.name= taskDTO.getTaskName();
        this.userId=taskDTO.getReleaseUserId();
        this.introduction=taskDTO.getTaskIntroduction();
        this.researchId=taskDTO.getResearchId();
        this.createTime=taskDTO.getCreateTime();
    }

    public Task(){

    }
}
